// Dialog 全局样式
.el-dialog {
  border-radius: $border-radius-lg;
  box-shadow: $card-shadow-heavy;
  border: none;
  overflow: hidden;
  
  // 对话框头部
  .el-dialog__header {
    background: $gradient-blue;
    border-bottom: 1px solid $border-color-light;
    padding: $spacing-lg $spacing-xl;
    margin: 0;
    
    .el-dialog__title {
      color: #ffffff;
      font-size: $font-size-lg;
      font-weight: 600;
      line-height: $line-height-base;
    }
    
    .el-dialog__headerbtn {
      top: $spacing-lg;
      right: $spacing-xl;
      
      .el-dialog__close {
        color: rgba(255, 255, 255, 0.8);
        font-size: $font-size-lg;
        transition: $transition-base;
        
        &:hover {
          color: #ffffff;
          transform: scale(1.1);
        }
      }
    }
  }
  
  // 对话框内容
  .el-dialog__body {
    background: $card-content-bg;
    padding: $spacing-sm;
    color: $card-text-color;
    line-height: $line-height-base;
    
    // 内容区域滚动
    max-height: 60vh;
    overflow-y: auto;
    
    &::-webkit-scrollbar {
      width: 6px;
    }
    
    &::-webkit-scrollbar-track {
      background: $bg-color-light;
      border-radius: $border-radius-sm;
    }
    
    &::-webkit-scrollbar-thumb {
      background: $primary-color;
      border-radius: $border-radius-sm;
      
      &:hover {
        background: darken($primary-color, 10%);
      }
    }
  }
  
  // 对话框底部
  .el-dialog__footer {
    background: $card-footer-bg;
    border-top: 1px solid $border-color-light;
    padding: $spacing-lg $spacing-xl;
    text-align: right;
    
    .el-button {
      margin-left: $spacing-sm;
      
      &:first-child {
        margin-left: 0;
      }
    }
  }
  
  // 不同尺寸的对话框
  &.el-dialog--small {
    .el-dialog__body {
      padding: $spacing-lg;
    }
    
    .el-dialog__footer {
      padding: $spacing-md $spacing-lg;
    }
  }
  
  &.el-dialog--large {
    .el-dialog__body {
      padding: $spacing-xl $spacing-extra-large;
    }
    
    .el-dialog__footer {
      padding: $spacing-lg $spacing-extra-large;
    }
  }
  
  // 全屏对话框
  &.el-dialog--fullscreen {
    border-radius: 0;
    
    .el-dialog__body {
      max-height: none;
    }
  }
  
  // 对话框动画
  &.dialog-fade-enter-active,
  &.dialog-fade-leave-active {
    transition: $transition-base;
  }
  
  &.dialog-fade-enter-from,
  &.dialog-fade-leave-to {
    opacity: 0;
    transform: scale(0.9);
  }
}

// 对话框遮罩层
.el-overlay-dialog {
  .el-overlay {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
  }
}

// 对话框内容区域特殊样式
.el-dialog__body {
  // 表单内容
  .el-form {
    .el-form-item {
      margin-bottom: $spacing-lg;
      
      &:last-child {
        margin-bottom: 0;
      }
    }
  }
  
  // 表格内容
  .el-table {
    margin: -$spacing-sm;
    
    .el-table__header {
      background: $gradient-table-header;
    }
    
    .el-table__row:hover {
      background: $gradient-table-hover;
    }
  }
  
  // 列表内容
  .el-list {
    .el-list-item {
      padding: $spacing-md 0;
      border-bottom: 1px solid $border-color-lighter;
      
      &:last-child {
        border-bottom: none;
      }
    }
  }
  
  // 警告信息
  .el-alert {
    margin-bottom: $spacing-lg;
    
    &:last-child {
      margin-bottom: 0;
    }
  }
  
  // 加载状态
  .el-loading-mask {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(1px);
  }
}

// 确认对话框特殊样式
.el-message-box {
  border-radius: $border-radius-lg;
  box-shadow: $card-shadow-heavy;
  border: none;
  overflow: hidden;
  
  .el-message-box__header {
    background: $gradient-blue;
    border-bottom: 1px solid $border-color-light;
    padding: $spacing-lg $spacing-xl;
    
    .el-message-box__title {
      color: #ffffff;
      font-size: $font-size-lg;
      font-weight: 600;
    }
    
    .el-message-box__headerbtn {
      top: $spacing-lg;
      right: $spacing-xl;
      
      .el-message-box__close {
        color: rgba(255, 255, 255, 0.8);
        transition: $transition-base;
        
        &:hover {
          color: #ffffff;
        }
      }
    }
  }
  
  .el-message-box__content {
    background: $card-content-bg;
    padding: $spacing-xl;
    color: $card-text-color;
    
    .el-message-box__message {
      color: $card-text-color;
      line-height: $line-height-base;
    }
  }
  
  .el-message-box__btns {
    background: $card-footer-bg;
    border-top: 1px solid $border-color-light;
    padding: $spacing-lg $spacing-xl;
    text-align: right;
    
    .el-button {
      margin-left: $spacing-sm;
      
      &:first-child {
        margin-left: 0;
      }
    }
  }
}

// 响应式对话框
@media (max-width: map-get($breakpoints, 'sm')) {
  .el-dialog {
    margin: $spacing-md !important;
    width: calc(100% - #{$spacing-md * 2}) !important;
    
    .el-dialog__header,
    .el-dialog__body,
    .el-dialog__footer {
      padding: $spacing-sm;
    }
  }
  
  .el-message-box {
    margin: $spacing-md !important;
    width: calc(100% - #{$spacing-md * 2}) !important;
    
    .el-message-box__header,
    .el-message-box__content,
    .el-message-box__btns {
      padding: $spacing-md;
    }
  }
} 